#业务类：注册表单业务

#导入和该业务有关的N个页面类
from page.page_form import PageForm

class ServiceForm(object):
    def __init__(self,driver,base_url):
        #初始化和该业务有关的N个页面类对象
        self.pageForm=PageForm(driver,base_url)

    def service_from_01(self,d):
        self.pageForm.openUrl()
        self.pageForm.input_zanhao(d["zanhao"])
        self.pageForm.input_pwd(d["pwd"])
        self.pageForm.selectSex(d["sex"])
        self.pageForm.selectGuoji(d["guoji"])
        self.pageForm.selectAihaos(d["aihaos"])
        self.pageForm.selectDegree(d["degree"])
        self.pageForm.input_jiesao(d["jiesao"])
        self.pageForm.uploadZaopian(d["zaopian"])
        self.pageForm.input_birthday(d["birthday"])
        self.pageForm.click_regButton()

        siji=self.pageForm.getZuceSuccessText() #"注册成功"
        return "成功" in siji

